package io.noties.markwon.plugin.tasklist.span

import android.graphics.drawable.Drawable
import io.noties.markwon.base.MarkwonConfiguration
import io.noties.markwon.base.RenderProps
import io.noties.markwon.base.SpanFactory
import io.noties.markwon.plugin.tasklist.TaskListProps

class TaskListSpanFactory(private val drawable: Drawable) : SpanFactory {
    override fun getSpans(configuration: MarkwonConfiguration, props: RenderProps): Any {
        return TaskListSpan(
            configuration.theme,
            drawable,
            TaskListProps.DONE[props, false]
        )
    }
}